#version 300 es
precision mediump float;

uniform sampler2D utexture0;
uniform sampler2D utexture1;
uniform float uValue;
in vec2 o_uv;
out vec4  fragColor;

void main(void)
{
    if(o_uv.x <= uValue){
        if(o_uv.y <= uValue){
            fragColor = texture(utexture1,vec2(o_uv.x + 1.0f - uValue,o_uv.y + 1.0f - uValue));
        }else{
            fragColor = texture(utexture0,o_uv);
        }
    }else{
        fragColor = texture(utexture0,o_uv);
    }
}
